<template>
	<view>
		汇总记录：<br/>
		<textarea v-model="oldData" maxlength="100000">
			
		</textarea>
		处理后:<br/>
		<textarea v-model="newData" maxlength="100000">
			
		</textarea>
		<button @click="deal">
			处理
		</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				oldData:'',
				newData:''
			}
		},
		onLoad() {
			
		},
		created() {
			
		},
		computed: {
	
		},
		methods: {
			deal(){
				debugger
				var Arr1=this.oldData.split('\n');
				var sum=0;
				for (var i = 0; i < Arr1.length; i++) {
					var item=Arr1[i];
					if(item!=""){
						sum+=parseInt(item);
					}
					
				}
				this.newData=sum;
			}
		}
	}
</script>

<style>
</style>